<%@ page language="java"  pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<meta charset="utf-8">
	<link rel="stylesheet" href="${pageContext.request.contextPath }/css/base.css" />
	<link rel="stylesheet" href="${pageContext.request.contextPath }/css/info-reg.css" />
    <title>项目申请</title>
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.js"></script>
    <style type="text/css" >
    	.article .apply_pro{ font: 16px/1.5 Tahoma,'瀹嬩綋'; margin: 0px auto;width: 100%}
		.article .apply_pro table tr{ line-height: 55px;}
		.article .title{ line-height:33px; background:url(${pageContext.request.contextPath }/images/righttitlebig.png) repeat-x; border:1px solid #c1d3de; overflow:visible;}
        .article .title h2{ margin-left:7px; padding-left:22px; font-weight:bold; font-size:14px; font-family:'瀹嬩綋'; color:#000000; background:url(${pageContext.request.contextPath }/images/titleico.png) no-repeat left center;}
		table{margin-left: 100px;}
    </style>
    <script type="text/javascript">
    	
    	function check(){
    		
    		var proname=$('#id_proname').val();
    		var profile=$('#id_proDetail').val();
    		var procash=$('#id_Cash').val();
    		if(""!=proname&&""!=profile&&""!=procash){
    			$('#id_submit').attr('disabled',false);
    		}else if(""==proname||""==profile||""==procash){
    			$('#id_submit').attr('disabled',true);
    		}
    		if(""!=proname){
    			$('#id_name').text("");
    		}else{
    			$('#id_submit').attr('disabled',true);
    		}
    		if(""!=profile){
    			$('#id_detail').text("");
    		}else{
    			$('#id_submit').attr('disabled',true);
    		}
    		
    		re=new RegExp('[0-9]+$'); 
    		if(""!=procash&&re.test(procash)){	
    			$('#id_cash').text("");
    		}else if(!re.test(procash)&&""!=procash){
    			$('#id_cash').text("请填写数字");
    			$('#id_submit').attr('disabled',true);
    		}else{
    			$('#id_cash').text("请填写项目资金!");
    			$('#id_submit').attr('disabled',true);
    		}
    		
    	}
    	function showSub(){
    		var url="${pageContext.request.contextPath }/lxp/projectManage/applyProject.jsp";
    		window.location.href=url;
    	}
    	//function checkSubmit(){
    	//	var proname=$('#id_proname').val();
    	//	var profile=$('#id_proDetail').val();
    	//	var procash=$('#id_Cash').val();
    	//	if(""!=proname&&""!=profile&&""!=procash){
    	//		$('#id_submit').attr('disaabled',false);
    	//	}else{
    		//	$('#id_submit').attr('disaabled',true);
    		//}
    		
    	//}
    </script>
  </head>
  
  <body>
  <div class="article">
  	<div class="title">
    	<h2>项目申请</h2>
    </div>
    
    <div class="apply_pro" style="background-color: #cca">
    	<form action="${pageContext.request.contextPath }/projectManage.action?method=saveApply" method="post" enctype="multipart/form-data">
    		<table width="75%" height="85%" align="center" border="1px">
    			<tr>
    				<td colspan="2">申请单号：
    				<input type="text" name="pro_id" disabled="disabled" value="自动生成中"/></td>
    				<td colspan="2">项目类型：
    					<input type="text" name="pro_type" value="公司内部" disabled="disabled"/>
    				</td>
    			</tr>
    			<tr>
    				<td>项目名称：
    				<input type="text" name="pro_name" id="id_proname" onmouseout="check();" style="width: 200px;"/>
    				</td>
    				<td>
    				<label id="id_name" style="font-size: 12px; color: red;position:relative; left:-65px;">请填写项目名称!</label>
    				</td>
    				<td>申请详情：
    				<input type="file" name="pro_detail" id="id_proDetail" accept=".docx,.doc" onmouseout="check();"/>
    				</td>
    				<td>
    				<label id="id_detail" style="font-size: 12px; color: red;position:relative; left:-90px;">请选择项目详情!</label>
    				</td>
    			</tr>
    			<tr>
    				<td>申请资金：
    				<input type="text" name="pro_applyCash" id="id_Cash" onmouseout="check();"/>
    				</td>
    				<td>
    				<label id="id_cash" style="font-size: 12px; color: red;position:relative; left:-110px;">请填写项目资金!</label>
    				</td>
    			</tr>
    			<tr>
    			    <td colspan="2">
    			    	<label style="margin-left: 300px;">
    			    		<input id="id_submit" disabled="disabled" type="submit" style="background-color: buttonshadow; font-size: 16px;" value="送交审批"/>
    			    		&nbsp;&nbsp;&nbsp;<input id="id_reset" type="button" style="background-color: buttonshadow; font-size: 16px;" value="清空" onclick="showSub();"/>
    			    	</label>
    			    </td>
    			</tr>
    		</table>
    	</form>
    </div>
   </div>
  </body>
</html>
